<?php
/**
 * 文字直播
 */
namespace app\sports\tlive\model;

use think\Db;
use think\Model;

class TliveModel extends Model
{

    private $database = 'sports_database';

    /*
     * 根据纳米id查询最后一次发生的事件名称
     *
     */
    public function Lasttime($nami_team_id)
    {
        return Db::database($this->database)->table('foot_ball_tlive')->where('nami_team_id',$nami_team_id)->max('time');
    }

    /*
     * 批量插入数据
     */
    public function InsertTliveAll(array $array)
    {
        return Db::database($this->database)->table('foot_ball_tlive')->strict()->insertAll($array);
    }


}